package com.fanhang.samples.springboot.data.jpa.service;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.fanhang.samples.springboot.data.jpa.domain.Country;

@Repository
public interface CountryRepository extends PagingAndSortingRepository<Country, Integer> {

	Page<Country> findByNameContainingAllIgnoringCase(@Param("name") String name, Pageable pageable);

	Country findByNameIgnoringCase(@Param("name") String name);

}
